$OpenBSD: patch-bin_logstash_lib_sh,v 1.2 2016/06/16 09:55:58 jasper Exp $

Revert: 44edf5bd00c116d356acbcd21369e4cebcbae5f9
See: https://github.com/elastic/logstash/pull/4303#issuecomment-162823365

--- bin/logstash.lib.sh.orig	Wed Jun 15 19:05:21 2016
+++ bin/logstash.lib.sh	Thu Jun 16 10:10:27 2016
@@ -62,8 +62,7 @@ setup_java() {
     # Causes the JVM to dump its heap on OutOfMemory.
     JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError"
     # The path to the heap dump location
-    # This variable needs to be isolated since it may contain spaces
-    HEAP_DUMP_PATH="-XX:HeapDumpPath=${LOGSTASH_HOME}/heapdump.hprof"
+    JAVA_OPTS="$JAVA_OPTS -XX:HeapDumpPath=${LOGSTASH_HOME}/heapdump.hprof"
   fi
 
   if [ "$LS_JAVA_OPTS" ] ; then
@@ -133,7 +132,7 @@ setup_vendored_jruby() {
 }
 
 setup_ruby() {
-  RUBYCMD="ruby"
+  RUBYCMD="${RUBY}"
   VENDORED_JRUBY=
 }
 
@@ -179,8 +178,8 @@ ruby_exec() {
     # $VENDORED_JRUBY is non-empty so use the vendored JRuby
 
     if [ "$DEBUG" ] ; then
-      echo "DEBUG: exec ${JRUBY_BIN} $(jruby_opts) "-J$HEAP_DUMP_PATH" $@"
+      echo "DEBUG: exec ${JRUBY_BIN} $(jruby_opts) $@"
     fi
-    exec "${JRUBY_BIN}" $(jruby_opts) "-J$HEAP_DUMP_PATH" "$@"
+    exec "${JRUBY_BIN}" $(jruby_opts) "$@"
   fi
 }
